﻿using Framework.Base;
using UnityEditor;
using NotImplementedException = System.NotImplementedException;

namespace Framework.ECS
{
    public class BaseComponent : BaseObject, IPoolObj
    {    
        
        /// <summary>
        ///  实例对象
        /// </summary>
        public BaseEntity entity = null;

        public Event.Event eventObj
        {
            get
            {
                return (entity != null) ? entity.eventObj : null;
            }
            
        }

        public void OnFetch()
        {
            
        }

        public void OnRecycle()
        {
            OnReset();
            entity = null;
        }

        public void OnStart()
        {
            
        }

        protected  virtual  void OnReset()
        {
            
        }



    }
}